﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="info.aspx.cs" Inherits="Our.Umbraco.uDbCompare.info" 
        MasterPageFile="~/umbraco/masterpages/umbracoPage.Master" Title="uDBCompare" %>

<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.controls" Assembly="umbraco" %>
<%@ Register TagPrefix="uDbCompare" Src="~/umbraco/uDbCompare/MacroInUse.ascx" TagName="MacroInUse" %>
<%@ Register TagPrefix="uDbCompare" Src="~/umbraco/uDbCompare/TemplateInUse.ascx" TagName="TemplateInUse" %>

<asp:Content ID="cphHead" ContentPlaceHolderID="head" runat="server">

</asp:Content>

<asp:Content ID="cphBody" ContentPlaceHolderID="body" runat="server">


<cc1:UmbracoPanel ID="umbPanelIndex" Text="DB Compare" runat="server" Width="612px" Height="600px" hasMenu="false">
		<cc1:Pane ID="PaneDBComapre" runat="server" Text="uDBCompare">
			<asp:Panel ID="DBComparePanel" runat="server">
                <h2>uDBCompare</h2>
                <p>
                    uDBCompare compares various items (Doc Types, Media Types, Templates, Data Types, Relationships, Dictionary Items, & Macros) in the current Umbraco database to a remote database.                      
                </p>
                <p>
                    To use, just right click on DB Compare and Create.  One node per database you want to compare to.  Then go under the settings
                    tab and type in the connection string.  As the connection string is stored in plain text in the database, its highly
                    recommended to use {0} for username and {1} for password.  Username & Password can then be cached in the session state.
                </p>
            </asp:Panel>
        </cc1:Pane>
		<cc1:Pane ID="PaneSyncTemplate" runat="server" Text="Sync Templates">
			<asp:Panel ID="SyncTemplatePanel" runat="server">
			    <h2>Sync Templates</h2>
			    <h3>WARNING: Please have a backup of our /masterpages folder before running!!!</h3>
			    <p>
			        
			        Experimental attempt to update the cmsTemplate table with actual template code from the files.
			    </p>
			    <p>
			        <asp:Button ID="SyncTemplateButton" runat="server" Text="Sync Templates" OnClick="SyncTemplateButton_OnClick" OnClientClick="javascript:return confirm('This may alter your /masterpages folder - Please backup before running!  Continue?');" />
			    </p>
            </asp:Panel>
        </cc1:Pane>
        
		<cc1:Pane ID="PaneSearch" runat="server" Text="Macro in use">
			<asp:Panel ID="SearchPanel" runat="server">
			    <uDbCompare:MacroInUse id="MacroInUse1" runat="server"></uDbCompare:MacroInUse>
            </asp:Panel>
        </cc1:Pane>
        
		<cc1:Pane ID="PaneSearchTemplate" runat="server" Text="Template in use">
			<asp:Panel ID="SearchTemplatePanel" runat="server">
			    <uDbCompare:TemplateInUse id="TemplateInUse1" runat="server"></uDbCompare:TemplateInUse>
            </asp:Panel>
        </cc1:Pane>
    
</cc1:UmbracoPanel>
</asp:Content>